﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _58常量
{
    internal class Program
    {
        private static void Main(string[] args)
        {
        }
    }

    internal class MyMath
    {
        //编译时常量1.定义时必须赋值2.不能加static修饰符3.不能改
        public const float Pi = 3.14159f;
    }

    internal class Player
    {
        //运行时常量,1.只能在定义的时候或者构造函数中赋值,不能改
        public readonly int id;
        public Player(int id)
        {
            this.id = id;
        }
    }
}